$(function () {
    //载入头部内容
    $("header").load("header.html")
    window.scrollTo(0, 0);
    //载入信息
    $.get("data/index.json",function(data){
        let set =new Set()
        while(true){
            let sum = Math.floor(Math.random()*data.authors.length)
            set.add(sum)
            if(set.size==data.authors.length){
                break
            }

        }

        set.forEach(function(s){
            
            $(".list").append(`            <li>
            <div class="left">
                <img src="${data.authors[s].headimg}" alt="">
                <div class="content">
                    <h6>${data.authors[s].name}</h6>
                    <span>${data.authors[s].desc}</span>
                </div>
                <button type="button" class="btn btn-warning ybtn">关注</button>
            </div>
            
        </li>`)


        });
        
        


    })

})
